package com.bw.kotlinim.ui.activity

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import com.bw.kotlinim.FragmentFactory
import com.bw.kotlinim.R
import com.bw.kotlinim.base.BaseActivity
import kotlinx.android.synthetic.main.activity_main.*

class MainActivity : BaseActivity() {
    override fun getLayoutId(): Int = R.layout.activity_main

    override fun init() {
        super.init()
        bottomBar.setOnTabSelectListener{tabId->
        val beginTransaction = supportFragmentManager.beginTransaction()
        beginTransaction.replace(
            R.id.fragment_frame,
        FragmentFactory.instance.setFragment(tabId)!!
        )
            beginTransaction.commit()
        }
    }
}

























